{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "65e36e6c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as pit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ff43027a",
   "metadata": {},
   "outputs": [],
   "source": [
    "def calXNew(XOld):\n",
    "    return (1 / XOld)+ (XOld / 2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "f89591c4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Finshed,the result is 1.4142135623730954\n"
     ]
    }
   ],
   "source": [
    "XOld = 5\n",
    "error = 1e-4\n",
    "i = 0\n",
    "maxIter = 50\n",
    "data = np.zeros((maxIter,4))\n",
    "while (i < maxIter):\n",
    "    XNew = calXNew(XOld)\n",
    "    difference = abs(XNew - XOld)\n",
    "    data[i,:] = [i+1 , XNew, XOld,difference]\n",
    "    data1 = XOld\n",
    "    if difference < error:\n",
    "        print (\"Finshed,the result is\",XNew)\n",
    "        break\n",
    "    XOld = XNew\n",
    "    i += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2f8dabde",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.00000000e+00, 2.70000000e+00, 5.00000000e+00, 2.30000000e+00],\n",
       "       [2.00000000e+00, 1.72037037e+00, 2.70000000e+00, 9.79629630e-01],\n",
       "       [3.00000000e+00, 1.44145537e+00, 1.72037037e+00, 2.78915002e-01],\n",
       "       [4.00000000e+00, 1.41447098e+00, 1.44145537e+00, 2.69843868e-02],\n",
       "       [5.00000000e+00, 1.41421359e+00, 1.41447098e+00, 2.57395571e-04]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[:i,:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "4dfdcfc3",
   "metadata": {},
   "outputs": [],
   "source": [
    "data1 = np.array([data[0,2],data[1,2],data[2,2],data[3,2],data[4,2]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "6b36e940",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([5.        , 2.7       , 1.72037037, 1.44145537, 1.41447098])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data1[:i]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "dfd7870d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAApb0lEQVR4nO3dd3yV5d3H8c+VEMhghB1WCHuFHZZUi6NVEQdiH7XW2Yr46PO0j1WGo1K3trVarSJWW6mrli3DiQMHWqCShA1hbwIJCdk5v+ePcyghBjjASc7I9/16nVfOue8rOT9uzNeL677v33FmhoiIhL+oYBcgIiKBoUAXEYkQCnQRkQihQBcRiRAKdBGRCFEnWG/crFkzS0lJCdbbi4iEpWXLlu03s+ZV7QtaoKekpLB06dJgvb2ISFhyzm053j4tuYiIRAgFuohIhFCgi4hECAW6iEiEUKCLiEQIvwLdObfZOZfhnPvOOfe9S1Oc15+ccxucc+nOuQGBL1VERE7kVC5bPNfM9h9n38VAF99jCPCi76uIiNSQQC25XA5MM68lQKJzrlWAfraISEQoLffwwqcbWLEtp1p+vr+BbsAHzrllzrmxVexvA2yr8Hq7b9sxnHNjnXNLnXNL9+3bd+rVioiEqcwduVzx5y956r21LMzcXS3v4e+Sy3Az2+mcawF86JxbY2afV9jvqvie731yhplNBaYCpKWl6ZM1RCTiFZWW89yi9Uz5LIvG8XV58boBXNy7ehYw/Ap0M9vp+7rXOT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YOdcaqUhIXFM/agz6MfUOTcK2Gtmy040rIptNX48/aw16Me0guFmNgC4GLjDOXdOpf0BPa4RG+hmdujIP3fNbAEQ45xrFoxanHMxeEPyDTObWcWQ7UC7Cq/bAjtroraKTlZnKB3TCjXlAJ8CF1XaFRLH9Ijj1Rkix3Q4cJlzbjPwNnCec+71SmNC5XietNYQOaZHatnp+7oXmAUMrjQkoMc1YgPdOZfknHO+54Px/lmzg1CHA14BVpvZ08cZNhe4wXfGeyiQa2a7aqxI/KszhI5pc+dcou95HHABsKbSsFA4pietMxSOqZlNMrO2ZpYCXAMsMrOfVRoW9OPpb62hcEx9753gnGtw5DnwY6DyVXkBPa51TrvaIHPOvYX3bHYz59x24EG8J50wsynAVcDtzrkyoBC4xnynlWvYcOB6IMO3lgpwL5BcodYFeM92bwAKgJtrvky/6gyVY9oKeM05F433l/UdM5vnnBtXodZQOKb+1Bkqx/R7QvB4HleIHtOWwCzf/1vqAG+a2XvVeVx167+ISISI2CUXEZHaRoEuIhIhFOgiIhFCgS4iEiEU6CIiEUKBLiISIRToIiIR4v8BKlrew2+u4GYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "pit.plot(data[:i,2],data[:i,2])\n",
    "pit.plot(data[:i,2],calXNew(data[:i,2]))\n",
    "i = 0\n",
    "while True:\n",
    "    pit.hlines(calXNew(data1[i]),data1[i + 1],data1[i])\n",
    "    pit.vlines(data1[i + 1],calXNew(data1[i + 1]),data1[i + 1])\n",
    "    i += 1\n",
    "    if data1[i] - 1.4142135 < 0.001:\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b9f4c9a7",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
